import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgModule } from '@angular/core';
import { GisComponent } from './gis.component';
import { RouterModule, Routes } from '@angular/router';
import { ShareModule } from 'app/shared/ShareModule';
import { PublicComponentModule } from 'app/public';
import { NgZorroAntdModule } from 'ng-zorro-antd';
import { MapLayerService } from './service/map-layer.service';
import { MapClusteredService } from './service/map-clustered.service';
import { MapViewService } from './service/map-view.service';
import { MalihuScrollbarModule } from 'ngx-malihu-scrollbar';
import { LegendsComponent } from './legends/legends.component';
import { MapMessageService } from './service/map-message.service';
import { MapDataService } from './service/map-data.service';
import { MapOverlayService } from './service/map-overlay.service';
import { MatVideoModule } from 'mat-video';
import { GisGuardService } from 'app/shared/guard/gis-guard.service';
import { AlertOverlayComponent } from './alert-overlay/alert-overlay.component';
import { ClusFeatOverlayComponent } from './clus-feat-overlay/clus-feat-overlay.component';
import { EquipmentOverlayComponent } from './equipment-overlay/equipment-overlay.component';
import { IncidentOverlayComponent } from './incident-overlay/incident-overlay.component';

const routes: Routes = [
    {
        path: '',
        component: GisComponent
        // canActivate: [GisGuardService]
    }
];
const COMPONENT = [
    GisComponent,
    LegendsComponent,
    AlertOverlayComponent,
    EquipmentOverlayComponent,
    ClusFeatOverlayComponent,
    IncidentOverlayComponent
];
const SERVICE = [MapLayerService, MapClusteredService, MapViewService, MapMessageService, MapDataService, MapOverlayService];

@NgModule({
    imports: [
        ShareModule,
        PublicComponentModule,
        FormsModule,
        ReactiveFormsModule,
        NgZorroAntdModule,
        MatVideoModule,
        MalihuScrollbarModule.forRoot(),
        RouterModule.forChild(routes)
    ],
    declarations: COMPONENT,
    providers: SERVICE
})
export class GisModule {}
